<?php

class AssetController extends Silk_Controller_Action {

    public function uploadAction(){
	$filepattern = 'asset-' . time() . rand() % 1000 . '.%ext%';
	$file = FP_File::Receive('asset'. Silk::get('uploadsdir'), $filepattern);

	if ($file){
	    $this->view->file = Zend_Json::encode($file);
	    $this->render('upload-success');
	} else
	    $this->render('upload-failed');
    }
}

?>